package com.oscar.practice.shiro.dao.user;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.oscar.practice.shiro.model.user.PermissionInfo;

/**
 * 权限
 *
 * @author tongyufu
 *
 */
@Repository
public interface PermissionDao {

    List<PermissionInfo> queryByUserId(Integer userId);

    List<PermissionInfo> queryByRoleId(Integer roleId);

    PermissionInfo queryById(Integer id);

    List<PermissionInfo> search(Map<String, Object> params);

    int searchTotal(Map<String, Object> params);

    int save(PermissionInfo permissionInfo);

    int update(PermissionInfo permissionInfo);

    int delete(Integer id);

    int deleteChild(Integer id);
}
